﻿@model BenzInfo.Hockey.Grenadiers.Models.Picture

@{
    ViewBag.Title = BenzInfo.Hockey.Grenadiers.Resources.Dictionary.EditPicture;
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Edit", "Pictures", FormMethod.Post, new { @encType = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@BenzInfo.Hockey.Grenadiers.Resources.Dictionary.Pictures</legend>
        
         @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.TitleEN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TitleEN)
            @Html.ValidationMessageFor(model => model.TitleEN)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TitleFR)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TitleFR)
            @Html.ValidationMessageFor(model => model.TitleFR)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DescriptionEN)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DescriptionEN)
            @Html.ValidationMessageFor(model => model.DescriptionEN)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DescriptionFR)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DescriptionFR)
            @Html.ValidationMessageFor(model => model.DescriptionFR)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FileName)
        </div>
        <div class="editor-field">
            <input class="upload" type="file" name="inputFile" id="inputFile" onchange="document.getElementById('FileName').value = this.value;" />
            @Html.HiddenFor(model => model.FileName)
            @Html.ValidationMessageFor(model => model.FileName)
        </div>
    </fieldset>
}
